#include "tests/UDPNet_Test.h"
#include "tests/MultiNet_Test.h"
#include "tests/NetworkControl_Test.h"
#include "tests/Interface_Test.h"
#include "tests/Debug_Test.h"
#include "tests/Event_Test.h"
#include "tests/SystemRoot_Test.h"
#include "tests/Config_Test.h"
#include "tests/Server_Test.h"
#include "tests/uiBase_Test.h"
#include "tests/FileRepository_Test.h"
#include "tests/FileControl_Test.h"
#include "tests/MultiMsg_Test.h"
#include "tests/MultiRing_Test.h"
#include "tests/MultiJoin_Test.h"
#include "tests/MultiLeave_Test.h"
#include "tests/Timer_Test.h"
#include "tests/nsRegister_Test.h"
#include "misc/Debug.h"

#include <iostream>
/*********************************************************/
int main(int argc, char ** argv) {
	std::cout << "Running all unit Tests!" << std::endl;

	InterfaceTest		intTest;		// Interface class tests
	DebugTest		debTest;		// Debug class tests
	EventTest		eveTest;		// Event class tests
	UDPNetTest		udpTest;		// UDPNetwork class tests
	MultiNetTest		mcTest;			// Multicast class tests
	ConfigTest		cfgTest;		// Configuration parsing tests
	nsRegisterTest		nsRegister;		// Nameserver Register packet tests
	MultiMsgTest		fMultiMsgTest;		// MultiMsg test class
	MultiRingTest		fMultiRingTest;		// MultiRing test class
	MultiJoinTest		fMultiJoinTest;		// MultiJoin test class
	MultiLeaveTest		fMultiLeaveTest;	// MultiLeave test class
	TimerTest		fTimerTest;		// Timer test class
	NetworkControlTest	ncTest;			// NetworkController tests
	ServerTest		servTest;		// Server tests
	SystemRootTest		sysTest;		// Boot sequence class tests
	uiBaseTest		uiBaseTest;		// UI base parsing tests
	FileRepoTest		fRepoTest;		// File repository testing
	FileControlTest		fCtrlTest;		// File Control class tests

	if (UnitTest::runAllTests()) {
		std::cout << std::endl << "Tests completed! ... no tests failed" << std::endl;
	} else {
		std::cout << std::endl << "Tests completed! ... some tests failed!" << std::endl;
		Debug::Instance().log("TestsLog.txt");
	}

	return 0;
}
/*********************************************************/
